# 获取购买笔记本的数量
s = int(input())
# 获取笔记本的单价
p = float(input())
# 根据购买数量判断折扣并计算总费用
if s < 6:
    total_cost = s * p
elif s <= 10:
    total_cost = s * p * 0.9
else:
    total_cost = s * p * 0.8
# 保留一位小数输出总费用
print("%.1f" % total_cost)